const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  devServer: {
    port: 8089,
    open: false,
    proxy: {
      '^/api': {
        target: 'http://127.0.0.1:8881',
        changeOrigin: true,
        // 重写，如果目标地址中存在 /api，就将 /api 替换为空字符串
        rewrite: path => path.replace(/^\/api/, '')
      }
    },
  }
});
